package com.local.videoplayer.adapter;

import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.local.videoplayer.R;
import com.local.videoplayer.bean.FolderBean;
import com.local.videoplayer.utils.LogUtil;
import java.util.ArrayList;

/**
 * Created by ccx on 17/8/14.
 */

public class FolderAdapter extends BaseQuickAdapter<FolderBean, BaseViewHolder> {

    public FolderAdapter() {
        super(R.layout.item_folder, new ArrayList<FolderBean>());
    }

    @Override
    protected void convert(BaseViewHolder helper, FolderBean item) {
        // helper.itemView.setBackgroundResource(R.drawable.recycler_bg);
        helper.setText(R.id.tv_video_number, String.valueOf(item.videos.size()));
        helper.setText(R.id.tv_folder_name, item.name);
        helper.getView(R.id.ll_action).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                LogUtil.e("ccx click");
            }
        });
    }
}
